package cn.wolfcode.crud.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Setter
@Getter
@ToString
@NoArgsConstructor
public class Notice {
    private Long id;
    //发布人
    private Employee issuer;
//发布时间
    private Date pubdate;
//发布标题
    private String title;
//发布内容
    private String content;
//状态
    private boolean status=false;

    public String getJson(){
        Map map =new HashMap();
        map.put("id",id);
        map.put("title",title);
        map.put("content",content);

        return JSON.toJSONString(map);

    }


}